#define _CRT_SECURE_NO_WARNINGS
#pragma once

#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<assert.h>

#define MAX 100
#define MAX_name 10
#define MAX_tele 15
#define MAX_addr 20

enum Input
{
	Exit,
	Add,
	Delete,
	Search,
	Modify,
	Show,
	Clear,
	Sort
};

typedef struct PeoInfo
{
	char name[MAX_name];
	int age;
	char tele[MAX_tele];
	char addr[MAX_addr];
}PeoInfo;

typedef struct Contact
{
	PeoInfo data[MAX];
	int sz;
}Contact;


void InitContact(Contact* pc);
void AddContact(Contact* pc);
void DeleteContact(Contact* pc);
void SearchContact(const Contact* pc);
void ModifyContact(Contact* pc);
void ShowContact(const Contact* pc);
void ClearContact(Contact* pc);
void SortContact(Contact* pc);